﻿@model trangbaocao.Models.StationsModel
<div class="container_12">       
    <div class="grid_12">            
        <div class="module">
                <h2 align="right"><span align="right"><a href="@Url.Action("Index", "Stations")">Quay lại</a></span></h2>                        
                    <div class="module-body">
                    @using (Html.BeginForm("EditStations", "Stations", FormMethod.Post, new { id = "EditStations" }))
                    {                      
                        <div align="center">
                            <h3>SỬA THÔNG TIN NHÀ TRẠM</h3>
                            <div class="account" align="center"> 
                            <img src="@Url.Content("~/Content/Body/Images/Body_Images/Edit_Station.png")" width="12%" />
                            </div>
                        </div>
                        if (TempData["msg"] != null)
                        {                            
                            <span class="notification n-error">@TempData["msg"]</span>
                        } 
                <table>
                     <div style="width:50%; text-align:center; float:left; margin-bottom:5px">
                        <p align="center">
                                <label style="width:55%; text-align:left;">Mã nhà trạm:</label>
                                <div class="tendangnhap" align="center" style="padding-left: 10px; width: 100%">
                                @Html.TextBoxFor(model => model.ma_tram, new { @name = "ma_tram", @class = "input-medium" }) 
                                <font color="red">(*)</font>
                                <label style="width:60%; text-align:left;">
                                @Html.ValidationMessageFor(model => model.ma_tram)
                                </label>
                                </div>                                                                     
                        </p>       
                        <p align="center">
                            <label style="width:55%; text-align:left;">Tên nhà trạm:</label>
                                <div class="thietbi" align="center" style="padding-left: 10px; width: 100%">
                                    @Html.TextBoxFor(model => model.name, new { @name = "name", @class = "input-medium" }) 
                                    <font color="red">(*)</font>
                                    <label style="width:60%; text-align:left;">
                                    @Html.ValidationMessageFor(model => model.name)
                                    </label> 
                                </div>                                            
                        </p>
                            
                        <p align="center">
                            <label style="width:55%; text-align:left;">Địa chỉ:</label>
                            @Html.TextBoxFor(model => model.dia_chi, new { @name = "dia_chi", @class = "input-medium" })
                       
                        </p>
                        <p align="center">
                            <label style="width:55%; text-align:left;">Trung tâm:</label>
                            @if (Model.trung_tam_id != null)
                            {
                                @Html.DropDownListFor(x => x.main_stations_id, Model.trung_tam_id, new {  @disabled = "disabled"})
                                @Html.HiddenFor(x => x.main_stations_id)     
                            }                        
                        </p>
                        <p align="center" style="padding-left:11px; width:100%">
                                <label style="width:60.8%; text-align:left;">Xã/Phường:</label>
                                        @*@Html.DropDownListFor(x => x.stations_id, Enumerable.Empty<SelectListItem>(),"---Chọn nhà trạm---")*@
                                         @if (Model.khuvucs_id != null)
                                         {                                  
                                             @Html.DropDownListFor(x => x.village_id, Model.khuvucs_id)
                                         }
                                        <font color="red">(*)</font>
                                <label style="width:60%; text-align:left;">
                                @Html.ValidationMessageFor(model => model.village_id)
                                </label>                    
                            </p> 
                        <p align="center">
                            <label style="width:55%; text-align:left;">Người quản lý:</label>
                            @Html.TextBoxFor(model => model.nguoi_quan_ly, new { @name = "nguoi_quan_ly", @class = "input-medium" })
                        
                        </p>
                        <p align="center">
                            <label style="width:55%; text-align:left;">Số điện thoại:</label>
                            @Html.TextBoxFor(model => model.so_dien_thoai, new { @name = "so_dien_thoai", @class = "input-medium" })
                        
                        </p>
                        @*<div class="select_date" align="center">
                            <label style="width:55%; text-align:left;">Ngày xây dựng:</label>
                                <p align="center" style="width:55%; text-align:left;">
                                    @Html.TextBoxFor(model => model.ngay_xay_dung, new { @name = "ngay_xay_dung", @class = "date" })                        
                                </p>
                        </div>*@
                        @*<p align="center">
                            <label style="width:55%; text-align:left;">Trạm Node B:</label>
                            <select name="tram_node_b">
                                <option value="0"  @(Model.tram_node_b == 0 ? "selected" : "")>Không</option>
                                <option value="1" @(Model.tram_node_b == 1 ? "selected" : "")>Có</option>
                            </select>
                        
                        </p>*@
                        @*<div class="select_date" align="center">
                            <label style="width:55%; text-align:left;">Ngày sử dụng:</label>
                                <p align="center" style="width:55%; text-align:left;">
                                    @Html.TextBoxFor(model => model.ngay_su_dung, new { @name = "ngay_su_dung", @class = "date" })
                                </p>                        
                        </div>*@
                        <p align="center">
                            <label style="width:55%; text-align:left;">Ghi chú:</label>
                            @Html.TextBoxFor(model => model.ghi_chu, new { @name = "ghi_chu", @class = "input-medium" })
                            @*<label>@Html.ValidationMessageFor(model => model.ghi_chu)</label>*@
                        </p>
                        
                   </div> <!--end div table-->
                   <div style="width:50%; text-align:center; float:left; margin-bottom:5px">
                        <div class="select_date" align="center">
                            <label style="width:55%; text-align:left;">Ngày xây dựng:</label>
                                <p align="center" style="width:55%; text-align:left;">
                                    @Html.TextBoxFor(model => model.ngay_xay_dung, new { @name = "ngay_xay_dung", @class = "date" })                        
                                </p>
                        </div>
                        <div class="select_date" align="center">
                            <label style="width:55%; text-align:left;">Ngày sử dụng:</label>
                                <p align="center" style="width:55%; text-align:left;">
                                    @Html.TextBoxFor(model => model.ngay_su_dung, new { @name = "ngay_su_dung", @class = "date" })
                                </p>                        
                        </div>
                        
                        <p align="center">
                                <label style="width:55%; text-align:left;">Tọa độ:</label>
                                @Html.TextBoxFor(model => model.toa_do, new { @name = "toa_do", @class = "input-medium" })
                            </p>
                            <p align="center">
                                <label style="width:55%; text-align:left;">Cột:</label>
                                <select name="cot">
                                    <option @(Model.cot == "TD18" ? "selected=selected" : "") value="TD18">TD18</option>
                                    <option @(Model.cot == "DC20" ? "selected=selected" : "") value="DC20">DC20</option>
                                    <option @(Model.cot == "NN20" ? "selected=selected" : "") value="NN20">NN20</option>
                                </select>
                            </p>
                            <p align="center">
                                <label style="width:55%; text-align:left;">CSHT (Cơ sở hạ tầng):</label>
                                <select name="csht">
                                    <option @(Model.csht == "VNPT" ? "selected=selected" : "") value="VNPT">VNPT</option>
                                    <option @(Model.csht == "VMS" ? "selected=selected" : "") value="VMS">VMS</option>
                                    <option @(Model.csht == "VNM" ? "selected=selected" : "") value="VNM">VNM</option>
                                    <option @(Model.csht == "VTN" ? "selected=selected" : "") value="VTN">VTN</option>
                                    <option @(Model.csht == "VIETTEL" ? "selected=selected" : "") value="VIETTEL">VIETTEL</option>
                                    <option @(Model.csht == "KHÁC" ? "selected=selected" : "") value="KHÁC">KHÁC</option>
                                </select>                                 
                            </p>
                            <p align="center">
                                <label style="width:55%; text-align:left;">Số cấp phép CSHT:</label>
                                @Html.TextBoxFor(model => model.cap_phep, new { @name = "cap_phep", @class = "input-medium" })
                            </p>
                            <div class="date_select" align="center">
                                <label style="width:55%; text-align:left;">Ngày cấp phép CSHT:</label>
                                    <p align="center" style="width:55%; text-align:left;">
                                        @Html.TextBoxFor(model => model.ngay_cap_phep, new { @name = "ngay_cap_phep", @class = "date" })
                                    </p>
                            </div>
                            <p align="center">
                                <label style="width:55%; text-align:left;">Loại CSHT:</label>
                                @Html.TextBoxFor(model => model.loai_csht, new { @name = "loai_csht", @class = "input-medium" })
                            </p>
                            <p align="center">
                                <label style="width:55%; text-align:left;">Kiểu CSHT:</label>
                                <select name="kieu_csht">
                                    <option @(Model.kieu_csht == "SHELTER" ? "selected=selected" : "") value="SHELTER">SHELTER</option>
                                    <option @(Model.kieu_csht == "OUTDOOR" ? "selected=selected" : "") value="OUTDOOR">OUTDOOR</option>
                                    <option @(Model.kieu_csht == "INDOOR" ? "selected=selected" : "") value="INDOOR">INDOOR</option>
                                </select>                                
                            </p>                         
                   </div>
              </table>                    
                        <div class="button" align="center">
                            <p align="center" style="width:26%; text-align:center">
                                <input class="submit-green" type="submit" value="Sửa" /> 
                                <input class="submit-gray" type="reset" value="Hủy" />
                                @*<input class="submit-gray" type="button"  onclick="location.href='@Url.Action("Index", "User")'" value="Quay lại" />*@
                            </p>
                        </div>  
                    }
                </div> <!-- End .module-body -->
            </div>  <!-- End .module -->
        <div style="clear:both;"></div>
    </div> <!-- End .grid_12 --> 
    <div style="clear:both;"></div>
</div> <!-- End .container_12 -->

<script type="text/javascript">
    $(document).ready(function () {
        $("#date").datepicker({ dateFormat: 'dd/mm/yy' });
    });
</script>